package com.aiyige.model.eshop;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhuyakun on 2018/1/29.
 */

public class OrderPay implements Parcelable {
    public static final int STATUS_WAITING_PAY = 0;
    public static final int STATUS_PAY_SUCCEED = 1;
    public static final int STATUS_PAY_FAILED = 2;


    String id;
    String orderCode;
    String payCode;
    String userId;
    String prepayId;
    Float amount;
    String payUrl;
    Integer status;
    String payMethod;
    String bankType;
    Long createTime;
    Long updateTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getPayCode() {
        return payCode;
    }

    public void setPayCode(String payCode) {
        this.payCode = payCode;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public Float getAmount() {
        return amount;
    }

    public void setAmount(Float amount) {
        this.amount = amount;
    }

    public String getPayUrl() {
        return payUrl;
    }

    public void setPayUrl(String payUrl) {
        this.payUrl = payUrl;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }

    public String getBankType() {
        return bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.orderCode);
        dest.writeString(this.payCode);
        dest.writeString(this.userId);
        dest.writeString(this.prepayId);
        dest.writeValue(this.amount);
        dest.writeString(this.payUrl);
        dest.writeValue(this.status);
        dest.writeString(this.payMethod);
        dest.writeString(this.bankType);
        dest.writeValue(this.createTime);
        dest.writeValue(this.updateTime);
    }

    public OrderPay() {
    }

    protected OrderPay(Parcel in) {
        this.id = in.readString();
        this.orderCode = in.readString();
        this.payCode = in.readString();
        this.userId = in.readString();
        this.prepayId = in.readString();
        this.amount = (Float) in.readValue(Float.class.getClassLoader());
        this.payUrl = in.readString();
        this.status = (Integer) in.readValue(Integer.class.getClassLoader());
        this.payMethod = in.readString();
        this.bankType = in.readString();
        this.createTime = (Long) in.readValue(Long.class.getClassLoader());
        this.updateTime = (Long) in.readValue(Long.class.getClassLoader());
    }

    public static final Creator<OrderPay> CREATOR = new Creator<OrderPay>() {
        @Override
        public OrderPay createFromParcel(Parcel source) {
            return new OrderPay(source);
        }

        @Override
        public OrderPay[] newArray(int size) {
            return new OrderPay[size];
        }
    };
}
